home *** CD-ROM | disk | FTP | other *** search
- Path: erich.triumf.ca!bennett
- From: bennett@erich.triumf.ca (P.Bennett)
- Newsgroups: comp.lang.c
- Subject: Re: Function!...Function!
- Date: 31 Jan 1996 07:37 PST
- Organization: TRIUMF: Tri-University Meson Facility
- Distribution: world
- Message-ID: <31JAN199607374132@erich.triumf.ca>
- References: <4emnfn$au5@ratree.psu.ac.th>
- NNTP-Posting-Host: erich.triumf.ca
- News-Software: VAX/VMS VNEWS 1.50
-
- In article <4emnfn$au5@ratree.psu.ac.th>, s3610165@maliwan.psu.ac.th (Sanon CHAOCHAIYAPORN) writes...
- >Dear all
- > Which function use to print a result of program to printer instead of
- >monitor? Thanks for your help....:)
-
- Depends on the operating system (and maybe compiler)
-
- For MS-DOS, both Borland an Microsoft compilers automatically fopen the printer
- as "stdprn" when your program starts, so you can print simply by saying:
-
- fprintf(stdprn, "the usual printf() stuff");
-
- To switch the output between screen, printer and file, you can do:
-
- FILE* output;
-
- /* set output = stdout or stdprn or fopen a file */
- fprintf(output, "as usual....");
-
-
-
- Peter Bennett VE7CEI | Vessels shall be deemed to be in sight
- Internet: bennett@triumf.ca | of one another only when one can be
- Packet: ve7cei@ve7kit.#vanc.bc.ca | observed visually from the other
- TRIUMF, Vancouver, B.C., Canada | ColRegs 3(k)
- GPS and NMEA info and programs: ftp://sundae.triumf.ca/pub/peter/index.html
-
-